/*
 * @Author: ZARR 
 * @Date: 2018-05-09 22:33:40 
 * @Last Modified by: ZARR
 * @Last Modified time: 2018-05-09 22:34:56
 * Article路由中间件，实现文章的增删改查
 */

import express from 'express'
import articleControll from '../controlls/Article'
const router = express.Router()

router.post('/', articleControll.addArticle) //写新文章

router.delete('/:url', articleControll.deleteArticleByUrl) //通过url删除文章，url是文章的主键

router.put('/:url', articleControll.updateArticle) //通过url查找并且更新文章,url是文章的主键

router.get('/', articleControll.getArticleByMultipleConditionAndPage) //通过多个条件查询文章

router.get('/count', articleControll.getArticleCountByMultipleCondition) //通过多个条件查询文章的数目

export default router